<?php

	Abstract Class Yomm_Module_Flickr Extends Yomm_Controller {
	
		private $flickr = null;
		
		public function __construct()
		{
			parent::__construct();
			
			$this->flickr = new Yomm_Library_Flickr();
			
		}
		
		protected function PhotosGetInfo($api_key, $photo_id)
		{
			return $this->flickr->API(array(
				'method' => 'flickr.photos.getInfo',
				'api_key' => $api_key,
				'photo_id' => $photo_id
			));	
		}
		
		protected function PhotosetsGetPhotos($api_key, $photoset_id)
		{
			return $this->flickr->API(array(
				'method' => 'flickr.photosets.getPhotos',
				'api_key' => $api_key,
				'photoset_id' => $photoset_id
			));
		}
		
		/*
		 * http://farm6.static.flickr.com/5029/5771231008_8032ba43f2_m.jpg
		 */
		protected function staticPhotoPath($farm, $server, $photo_id, $secret, $size = 'm')
		{
			return "http://farm{$farm}.static.flickr.com/{$server}/{$photo_id}_{$secret}_{$size}.jpg";
		}
	
	}